<template>
  <div>

    <div style="height:60px;padding: 0 1.2rem;" class="row container">

      <router-link :to="{ path: '/', query: {}}" class="col-2 text-left">
        <img src="../../static/img/logo.png" alt="logo" style="width:70px;">
      </router-link>
      <div class="col-4">
      </div>
      <div href="#" class="col-6 text-right"  style="padding-top:20px;">
        <router-link :to="{ path: '/login', query: {}}"><button type="button" class="btn btn-light btn-sm">登录</button></router-link>
        <router-link :to="{ path: '/register', query: {}}"><button type="button" class="btn btn-light btn-sm">注册</button></router-link>
      </div>
    </div>

    <ul class="nav nav-pills container" style="padding:1rem 2rem;">
      <li class="nav-item">
        <router-link class="nav-link" :to="{ path: '/', query: {}}">常用网站</router-link>
      </li>

      <li class="nav-item">
        <router-link class="nav-link" :to="{ path: '/stockindex', query: {}}">大盘指数</router-link>
      </li>

      <li class="nav-item">
        <router-link class="nav-link" :to="{ path: '/news', query: {}}">热门新闻</router-link>
      </li>
      
      <li class="nav-item">
        <router-link class="nav-link active" :to="{ path: '/discuss', query: {}}">个股说说</router-link>
      </li>

      <li class="nav-item">
        <router-link class="nav-link" :to="{ path: '/plan', query: {}}">灵气策略</router-link>
      </li>
    </ul>

    <div style="height:20px;background-color:#e9ecef73"></div>

    <!-- <button @click="go">更多指数</button> -->

    <div class="container-fluid container" style="padding:2rem;">
      <div class="row">

      <p>功能开发中</p>
     
      </div>
    </div>

    <!-- foot -->
    <Footer/>

  </div>
</template>

<script>
import Footer from '../components/Footer.vue'

export default {
  components: {
    Footer
  },
  data () {
    return {
      nowIndex: [],
      moreIndex: []
    }
  },
  created() {
    // getSite()
    // this.axios.get(`${this.config.baseURL}:${this.config.port}/api/stock_index?id=now_index`).then((response) => {
    //   console.log('sdsdf', response.data.data)
    //   this.nowIndex = response.data.data
    // })
  
  },
  methods: {
    go () {
      this.$router.push('/moreindex')
    },
  // 注册
  getSite() {
    this.$axios.get('/website/siteList').then(({status,data})=>{
        if(status===200){
          if(data&&data.code === 1){
            console.log('this.middleList', data.data.favorite)
            this.middleList = data.data.favorite

            // setTimeout(()=>{
            //   this.$message.success('取出成功');
            // }, 2300)
          } else if(data&&data.code === 0) {
            this.middleList = data.data
          } else {
            // this.error=data.msg
            // this.$message.error(data.msg);
          }
        }else{
          this.error=`服务器出错`
        }
      })
    }
  }  
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  text-decoration:none
}
.card {
   margin-bottom:2rem
}
.nav-link.active {
  background-color: #409eff;
}
</style>
